package com.paic.icore.test.demo.util;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * 描述:
 *
 * @author HUXINGJIE666
 * @date 2017年12月26日下午2:07:56
 */
public class ResponseResult implements Serializable {

	private static final long serialVersionUID = -1535893947431997633L;

	private String code;

	private String msg;

	private Object data;

	public ResponseResult() {
		this(ReturnCode.Common.SUCCESS, "");
	}

	public ResponseResult(Object data) {
		this(ReturnCode.Common.SUCCESS, data);
	}

	public ResponseResult(ReturnCode returnMsg) {
		this(returnMsg, "");
	}

	public ResponseResult(ReturnCode returnMsg, Object data) {
		this.code = returnMsg.getCode();
		this.msg = returnMsg.getMsg();
		this.data = data;
	}

	public ResponseResult(String code, String msg) {
		this.code = code;
		this.msg = msg;
		this.data = "";
	}

	public ResponseResult(String code, String msg, Object data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return msg;
	}

	/**
	 * @param msg
	 *            the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}

	/**
	 * @return the data
	 */
	public Object getData() {
		return data;
	}

	/**
	 * @param data
	 *            the data to set
	 */
	public void setData(Object data) {
		this.data = data;
	}

}
